Page({

 data: {
    
  },

  onLoad(options) {
   this.login()
  },

  login(){
    wx.getUserProfile({
      desc: '用于完善用户资料',
      success:res=>{
          let avatar = res.userInfo.avatarUrl;
          let nickName = res.userInfo.nickName;
          console.log(avatar,nickName);
      }
    })
  }


 
})